<template>
    <div>
        <el-card shadow="always" :body-style="{ padding: '20px', height: '90px' }">
            <div class="flex justify-evenly text-box">
                <div class="title-cont">
                    <p>{{ title }}</p>
                    <h2>{{ num }}</h2>
                </div>
                <div :style="{ display: 'flex', height: '100%', alignItems: 'center' }">
                    <i :class="['iconfont', icon]" :style="{ color}"></i>
                </div>
            </div>
        </el-card>
    </div>
</template>

<script setup lang="ts">

interface PropsType {
    title: string;
    num: number;
    icon: string;
    color: string;
}
defineProps<PropsType>()

</script>

<style lang="scss">
div {
    box-sizing: border-box;
    color: #666;
}

.text-box {
    height: 100%;

    .title-cont {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;

        p {
            font-size: 14px;
        }

        h2 {
            font-weight: bold;
            font-size: 18px;
            letter-spacing: 2px;
        }
    }

    div {
        i {
            font-size: 35px;
        }
    }
}
</style>